﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/Private/SiteAdmin.Master"
    AutoEventWireup="true" CodeBehind="Price.aspx.cs" Inherits="Obligatorio2013.Pages.Private.Price" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Panel ID="Panel1" GroupingText="Registro de Precios" runat="server" Height="295px"
        Width="751px">
        <asp:Label ID="lblPalabra" runat="server" Text="Precio Palabra" Width="130px" />
        &nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="txtPrecioPalabra" runat="server" Width="70px" />
        &nbsp;&nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
            ControlToValidate="txtPrecioPalabra" ErrorMessage="Debe ingresar un costo por palabra." />
        &nbsp;
        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtPrecioPalabra"
            ErrorMessage="Ingrese unicamente numeros." ValidationExpression="^\d+$" />
        <br />
        <br />
        <asp:Label ID="lblPorcentaje" runat="server" Text="% Premium Adicional" Width="130px" />
        &nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="txtPorcentaje" runat="server" Width="70px" />
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="txtPorcentaje"
            runat="server" ErrorMessage="Debe ingresar % adicional a las publicaciones premium." />
        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="Ingrese unicamente numeros."
            ControlToValidate="txtPorcentaje" ValidationExpression="^\d+$" />
        <br />
        <br />
        <div>
            <asp:Button ID="btnGuardar" runat="server" Text="Guardar" OnClick="btnGuardar_Click" />
            &nbsp;&nbsp;&nbsp;
            <asp:Button ID="BtnCancelar" runat="server" Text="Cancelar" CausesValidation="false"
                OnClick="BtnCancelar_Click" />
        </div>
        <div>
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
        </div>
    </asp:Panel>
    <asp:Panel ID="Panel2" runat="server" GroupingText="Historico Precios" Height="295px"
        Width="751px">
        <br />
        <asp:Label ID="lblMessage" runat="server"/>
        <asp:GridView ID="gvPriceList" runat="server"  AllowPaging="True" PageSize="5"
        AutoGenerateColumns="False" AllowSorting="True"
         OnPageIndexChanging="gvPriceList_PageIndexChanging" OnSorting="gvPriceList_Sorting">
            <Columns>
                <asp:BoundField DataField="basicCost" HeaderText="Precio Basico" />
                <asp:BoundField DataField="premiumCost" HeaderText="Precio Premium" />
                <asp:BoundField DataField="percent" HeaderText="Porcentaje Premium" />
                <asp:BoundField DataField="changeDate" HeaderText="Fecha Vigencia" NullDisplayText=" "
                    DataFormatString="{0:g}" />
            </Columns>
        </asp:GridView>
    </asp:Panel>
</asp:Content>
